package com.ruoyi.project.student.controller;

import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.project.student.domain.vo.Liststudent;
import com.ruoyi.project.student.service.IClassService;
import com.ruoyi.project.student.service.IStudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/class/class")
public class ClassContontroller {
    @Autowired
    private IClassService classService;
    @PreAuthorize("@ss.hasPermi('student:student:list')")
    @GetMapping("/list")
    public TableDataInfo list(Liststudent class)
    {
        startPage();
        List<Liststudent> list = classService.selectStudentList(class);
        return getDataTable(list);
    }
}
